home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP Eylül 1998.iso / Slackwar / docs / mini / RCS < prev    next >
Text File  |  1997-08-17  |  8KB  |  201 lines

  1.   The RCS MINI-HOWTO
  2.   Robert Kiesling
  3.   $Id: RCS-HOWTO.sgml,v 1.4 1997/08/14 15:09:56 rak Exp rak $
  4.  
  5.   This document covers basic installation and usage of RCS, the GNU
  6.   Revision Control System, under Linux.  It also covers the installation
  7.   of the diff(1) and diff3(1) utilities, which are necessary for RCS to
  8.   operate.  This document may be reproduced freely, in whole or in part,
  9.   provided that any usage of this document conforms to the general copy¡
  10.   right notice of the HOWTO series of the Linux Documentation Project.
  11.   See the file COPYRIGHT for details.  Send all complaints, suggestions,
  12.   errata, and any miscellany to kiesling@terracom.net, so I can keep
  13.   this document as complete and up to date as possible.
  14.  
  15.   1.  Overview of RCS.
  16.  
  17.   RCS, the revision control system, is a suite of programs that tracks
  18.   changes in text files and controls shared access to files in work
  19.   group situations.  It is generally used to maintain source code
  20.   modules.  It lends itself to tracking revisions of document files as
  21.   well.
  22.  
  23.   RCS was written by Walter F. Tichy and Paul Eggert.  The latest
  24.   version which has been ported to Linux is RCS Version 5.7.  There is
  25.   also a semi-official, threaded version available.  Much of the
  26.   information in this HOWTO is taken from the RCS man pages.
  27.  
  28.   RCS includes the rcs(1) program, which controls RCS archive file
  29.   attributes, ci(1) and co(1), which check files in and out of RCS
  30.   archives, ident(1), which searches RCS archives by keyword
  31.   identifiers, rcsclean(1), a program to clean up files that are not
  32.   being worked on or haven't changed, rcsdiff(1), which runs diff(1) to
  33.   compare the revisions, rcsmerge(1), which merges two RCS branches into
  34.   a single working file, and rlog(1), which prints RCS log messages.
  35.  
  36.   Files archived by RCS may be text of any format, or binary if the diff
  37.   program used to generate change files handles 8-bit data.  Files may
  38.   optionally include identification strings to aid in tracking by
  39.   ident(1).  RCS uses the utilities diff(1) and diff3(3) to generate the
  40.   change files between revisions.  A RCS archive consists of the initial
  41.   revision of a file, which is version 1.1, and a series of change
  42.   files, one for each revision.  Each time a file is checked out of an
  43.   archive with co(1), edited, and checked back into the archive with
  44.   ci(1), the version number is increased, for example, to 1.2, 1.3, 1.4,
  45.   and so on for successive revisions.
  46.  
  47.   The archives themselves commonly reside in a ./RCS subdirectory,
  48.   although RCS has other options for archive storage.
  49.  
  50.   For an overview of RCS, see the rcsintro(1) manual page.
  51.  
  52.   2.  System requirements.
  53.  
  54.   RCS needs diff(1) and diff3(3) to generate the context diff files
  55.   between revisions.  The diff utilities suite needs to be installed on
  56.   your system, and when you install RCS, the software will check for its
  57.   presence.
  58.  
  59.   Precompiled diffutils binaries are available at:
  60.  
  61.   ftp://sunsite.unc.edu/pub/Linux/utils/text/diffutils-2.6.bin.ELF.tar.gz
  62.  
  63.   and its mirror sites.  If you need to compile diff(1), et al., from
  64.   source, it is located at:
  65.  
  66.   ftp://prep.ai.mit.edu/pub/gnu/diffutils-2.7.tar.gz
  67.  
  68.   and its mirror sites.
  69.  
  70.   You will also need to have the ELF libraries installed on your system
  71.   if you want to install pre-built binaries.  See the ELF-HOWTO for
  72.   further details.
  73.  
  74.   3.  Compiling RCS from Source.
  75.  
  76.   Get the source distribution of RCS Version 5.7.  It is available at
  77.  
  78.   ftp://sunsite.unc.edu/pub/Linux/devel/vc/rcs-5.7.src.tar.gz
  79.  
  80.   and its mirrors. After you have unpacked the archive into your source
  81.   tree, you need to configure RCS for your system.  This is done via the
  82.   configure script in the source directory, which you need to execute
  83.   first.  This will generate a Makefile and the appropriate conf.sh for
  84.   your system.  You can then type
  85.  
  86.   make install
  87.  
  88.   which will build the binaries.  At some point you may need to su to
  89.   root so the binaries can be installed in the correct directories.
  90.  
  91.   4.  Creating and maintaining archives.
  92.  
  93.   The program rcs(1) does the work or creating archives and modifying
  94.   their attributes.  A summary of rcs(1) options may be found in the
  95.   rcs(1) manual page.
  96.  
  97.   The easiest way to create an archive is first to mkdir RCS in the
  98.   current directory, then initialize the archive with the
  99.  
  100.   rcs -i name_of_work_file
  101.  
  102.   command.  This creates and archive with the name
  103.   ./RCS/name_of_work_file,v and requests a text message describing the
  104.   archive, but it does not deposit any revisions in the archive.  You
  105.   can turn on or off strict archive locking with the commands
  106.  
  107.   rcs -L name_of_work_file
  108.  
  109.   and
  110.  
  111.   rcs -U name_of_work_file
  112.  
  113.   respectively.  There are other options for controlling access to the
  114.   archive, setting its format, and setting revision numbers, which are
  115.   covered in the rcs(1) manual page.
  116.  
  117.   5.  ci(1) and co(1).
  118.  
  119.   ci(1) and co(1) are the commands used to check files in and out of
  120.   their RCS archives.  The ci(1) command may also be used to a check a
  121.   file both in and out of an archive.  In their simplest forms, ci(1)
  122.   and co(1) take only the name of the working file.
  123.  
  124.   ci name_of_work_file
  125.  
  126.   and
  127.  
  128.   co name_of_work_file
  129.  
  130.   The command form
  131.  
  132.   ci -l name_of_work_file
  133.  
  134.   checks in the file with locking enabled, and
  135.  
  136.   co -l name_of_work_file
  137.  
  138.   is performed automatically. That is, ci -l checks the file out again
  139.   with locking enabled.
  140.  
  141.   ci -u name_of_work_file
  142.  
  143.   checks the file into the archive, and checks it out again with locking
  144.   disabled.  In all cases, the user is prompted for a log message.
  145.  
  146.   ci(1) will also create a RCS archive if one does not exist already.
  147.  
  148.   If you don't specify a revision, ci(1) increments the version number
  149.   of the last revision locked in the archive, and appends the revised
  150.   working file to it.  If you specify a revision on an existing branch,
  151.   it must be higher than the existing revision numbers.  ci(1) will also
  152.   create a new branch if you specify the revision of a branch which does
  153.   not exist.  See the ci(1) and co(1) man pages for details.
  154.  
  155.   ci(1) and co(1) have various options for interactive and non-
  156.   interactive use.  Again, see the ci(1) and co(1) man pages for
  157.   details.
  158.  
  159.   6.  Revision histories.
  160.  
  161.   The rlog(1) program provides information about the archive file and
  162.   the logs of each revision stored in it.  A command like
  163.  
  164.   rlog work_file_name
  165.  
  166.   will print the version history of the file, each revision's creation
  167.   date and userids of author and the person who locked the file.  You
  168.   can specify archive attributes and revision parameters to view.
  169.  
  170.   7.  Including RCS data in working files.
  171.  
  172.   co(1) maintains a list of keywords of the RCS database which are
  173.   expanded when the working file is checked out.  The keyword $Id$ in a
  174.   document will expand to a string which contains the file name,
  175.   revision number, the date checked out, the author, the revision
  176.   status, and the locker, if any.  Including the keyword $Log$ will
  177.   expand to the document's revision history log.
  178.  
  179.   These and other keywords may be used as search criteria of the RCS
  180.   archive.  See the ident(1) man page for further details.
  181.  
  182.   8.  RCS and emacs(1) Version Control.
  183.  
  184.   The Version Control facility of emacs(1) works as a front end to RCS.
  185.   This information applies specifically to Version 19.34 of GNU Emacs,
  186.   which is provided with the major Linux distributions.  When editing a
  187.   file with emacs(1) which is registered with RCS, the command vc-
  188.   toggle-read-only (bound to C-x C-q by default) will check a file in to
  189.   the emacs's Version Control, and then into RCS.  Emacs will open a
  190.   buffer where you can type a log message to be included in the RCS log.
  191.   When you are finished typing a log entry, type C-c C-c to terminate
  192.   your input and proceed with the check-in process.
  193.  
  194.   If you have selected strict locking for the file with RCS, you must
  195.   re-lock the file for editing by emacs(1).  You can check the file out
  196.   for emacs's Version Control with the command % in buffer-menu mode.
  197.  
  198.   For more information, see the GNU Emacs Manual and the Emacs info
  199.   pages.
  200.  
  201.